package com.itheima.jihejinjie;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;

/**
 * @author zhangbaiyan
 * @date 2024-09-12 21:29
 * @description:
 * @version:
 */
public class test2 {
    public static void main(String[] args) {

        //1.定义集合
        ArrayList<String> list = new ArrayList<>();
        //2.添加数据
        Collections.addAll(list,"张三","李四","王五","赵六","田七");
        //3.随机点名
        System.out.println(list.remove(new Random().nextInt(list.size())));

        StringBuilder sb = new StringBuilder();
        sb.append("-").append(1).append(1);
        System.out.println(sb);

    }
}
